Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix definition.cloze and text-based getMedia in handlebars being escaped #857

Merged
merged 4 commits into from
May 4, 2024

Conversation

Kuuuube
Copy link
Member

@Kuuuube Kuuuube commented Apr 23, 2024

Turns out there were some other handlebars that needed fixing besides {sentence-furigana} #733

The output of definition.cloze needs to not be escaped. This requires using {{{ }}} syntax. https://handlebarsjs.com/guide/expressions.html#html-escaping

Text-based getMedia also should not be escaped ({clipboard-text} and {selection-text}).

Fixes #856

@Kuuuube Kuuuube requested a review from a team as a code owner April 23, 2024 13:45
@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug area/anki The issue or PR is related to Anki integration labels Apr 23, 2024
Copy link

github-actions bot commented Apr 23, 2024

✔️ No visual differences introduced by this PR.

View Playwright Report (note: open the "playwright-report" artifact)

@Kuuuube Kuuuube changed the title Fix definition.cloze in handlebars not being unescaped Fix definition.cloze in handlebars being escaped Apr 23, 2024
@Kuuuube
Copy link
Member Author

Kuuuube commented Apr 24, 2024

{clipboard-text} also has this issue. Added a fix for it.

@Kuuuube
Copy link
Member Author

Kuuuube commented Apr 24, 2024

Aaaand also {selection-text} I think this is all of them now I'm not seeing any other handlebars where this could be an issue. {search-query}, {document-title}, and {url} all work totally fine.

@Kuuuube Kuuuube changed the title Fix definition.cloze in handlebars being escaped Fix definition.cloze and text-based getMedia in handlebars being escaped Apr 24, 2024
@jamesmaa jamesmaa added this pull request to the merge queue May 4, 2024
Merged via the queue into yomidevs:master with commit c3c5d58 May 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/anki The issue or PR is related to Anki integration kind/bug The issue or PR is regarding a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redundant escaping is still an issue
3 participants